The NGN comes forth as a result of convergence of a Time Division Multiplex (TDM)-based Public Switched Telephone Network (PSTN) and an Internet Protocol (IP)-based or Asynchronous Transfer Mode (ATM)-based packet network. The NGN makes it possible to implement integrated services such as voice, video and data on the same network, and ushers in a new era of the next-generation telecom network.
FIG. 1 shows architecture of an existing NGN in the prior art. As shown in FIG. 1, the NGN includes a Media Gateway (MGW) and a Media Gateway Controller (MGC). The MGC is adapted to manage call states and control the MGW bearer resources. The MGW is adapted to convert the media stream type from one format to another format, for example, from an E1 timeslot in a Circuit-Switched (CS) network to a Real time Transport Protocol (RTP) media stream in an IP network, and implement setup, modification and release of media streams and resource management under the signaling control of the MGC.
As shown in FIG. 1, if the bearer network that carries MGW1 and the bearer network that carries MGW2 are the same private network or public network, the IP packet can be sent from MGW1 to MGW2 directly and vice versa. However, if the bearer network that carries MGW1 is different from the bearer network that carries MGW2, for example, MGW1 is in a public network but MGW2 is in a private network, or MGW1 and MGW2 are in two different private networks between which IP packets cannot be exchanged directly, the media stream may be unidirectional or blocked. The same problem may also exist in the case that one side of the media stream is a MGW and the other side is a Session Initiation Protocol (SIP) terminal, or H323 terminal, or CS domain network terminal, or a Packet-Switched (PS) domain network terminal.
In the prior art, in order to transmit the IP packet between the private network and the public network, the network address/port translation technology is generally applied. Network Address Translation (NAT) is a standard technology for mapping one address field such as an Intranet to another address field such as Internet. The NAT allows a terminal in an Intranet exclusively used within an organization (namely, a private network) to be connected to a terminal in a public domain (namely, public network), and the internal terminal does not need to have a registered Internet address.
In the NAT traversal technology that derives from the NAT technology, the terminal on a private network has a private IP address and accesses the public network through a Network Address Translator (NAT)/Fire Wall (FW) at the egress. Two common NAT traversal modes available currently are: Simple Traversal of UDP Through Network Address Translators (STUN) mode of the User Datagram Protocol (UDP), and Traversal Using Relay NAT (TURN) mode.
The process of implementing the STUN mode is: Through a UDP, the STUN client sends a request STUN message to the STUN server outside the NAT. After receiving the request message, the STUN server generates a response message. The response message carries information about the source port of sending the request message, namely, the corresponding external interface of the STUN CLIENT on the NAT. Through the NAT, the STUN server sends the response message to the STUN client. Through the response message, the STUN client knows the external address of the NAT, and fills the external address into the UDP load of the call protocol, telling the receiver that the RTP receiving address and the port ID of the local side are the external address and the port ID of the NAT. Because the NAT mapping table entries of the media stream are already set up on the NAT through the STUN protocol beforehand, the media stream can traverse the NAT smoothly.
The implementation method of the TURN mode is similar to the implementation method of the STUN mode. In the private network, the Voice over IP (VoIP) terminal knows the service address of the public network beforehand, and fills the service address into the IP packet payload, namely, the address information of the signaling.
In the prior art, the NGN implements the NAT traversal in the following way:
In the private network, the address of the RTP endpoint (RTP1) in the local Session Description Protocol (SDP) is reported by MGW1 in the private network to the MGC at the time of capability negotiation, and this address is a private network address. It is assumed that the address is the address of Customer Premises Equipment (CPE) 2. In the H.248 message sent by the MGC to MGW2 in the public network, the remote address of the RTP endpoint (RTP2) of the MGW2 is specified to be the address of CPE2. In this way, according to the H.248 protocol, RTP2 sends the media stream to the address of CPE2 when sending the media stream to the MGW1 subsequently. However, CPE2 is a private network address, which is unreachable by the media stream that comes from RTP2. Therefore, when the media stream sent from the endpoint RTP1 passes through the NAT, the NAT converts the address of the media stream from CPE2 to CPE1, and a packet signal that carries the CPE1 address information is added into the H.248.37. The packet signal is delivered to RTP2, instructing RTP2 to perform NAT traversal. The RTP2 replaces the received address (CPE1 address) with the old remote private network address (CPE2 address), and sends the subsequent media stream to CPE1. According to the preset address mapping relation, the NAT sends the media stream received by CPE1 to the private network address (CPE2 address) of MGW1.
The defects of the foregoing method are: The NAT traversal defined in the H.248.37 requires the endpoint in the private network to send the media stream to the endpoint in the public network first so that the NAT is triggered to generate address mapping; the endpoint on the public network uses the received media stream source address as a destination address of sending the media stream. In many circumstances, however, the network bears only unidirectional media streams such as ring back tone and color ring back tone to be played by the peer end. Because the called party has not gone off-hook at this time, no media stream is sent from the calling party in the private network. Besides, when the silence detection is activated, if the user in the private network is silent, no media stream is sent from the private network to the public network; and the public network is unable to send the media stream to the private network. That is, as defined by the H.248.37, the endpoint in the private network needs to send the media stream to the IP endpoint on the public network first. Otherwise, the interworking of the media stream is impossible, thus affecting transmission stability of media streams in the NGN.